package dletc.job;

import java.util.List;

//定义一个测试类： 创建 DAO 类的对象， 分别调用其 save、get、update、list、delete 方 法来操作 User 对象， 
public class TestUser {

	public static void main(String[] args) {
		
		Dao<User> dao = new Dao<>();
		
		dao.save("001", new User(1,"张三"));
		dao.save("002", new User(2,"李四"));
		dao.save("003", new User(3,"王五"));
		
		dao.get("001");
		
		dao.update("005", new User(1,"张三") ); //未找到该id
		dao.update("003", new User(5,"赵六") );
		
		List<User> list = dao.list();
		System.out.println(list);
		
		dao.delete("003");
		System.out.println(list);

	}

}
